<?php

/**
 * Laravel-admin - admin builder based on Laravel.
 *
 * @author z-song <https://github.com/z-song>
 *
 * Bootstraper for Admin.
 *
 * Here you can remove builtin form field:
 * Encore\Admin\Form::forget(['map', 'editor']);
 *
 * Or extend custom form field:
 * Encore\Admin\Form::extend('php', PHPEditor::class);
 *
 * Or require js and css assets:
 * Admin::css('/packages/prettydocs/css/styles.css');
 * Admin::js('/packages/prettydocs/js/main.js');
 *
 */

//App::setLocale('zh-CN');
//setlocale(LC_ALL, 'zh_CN.UTF8');

Encore\Admin\Form::forget(['map', 'editor']);

//Encore\Admin\Form::extend('ueditor', App\Admin\Extensions\UEditor::class);
Encore\Admin\Form::extend('froala', App\Admin\Extensions\Froala::class);

// 超级管理员下去掉“个人信息”菜单栏，这是给系中心人员使用的
$user = Admin::user();
if ($user && $user->isAdministrator()) {
    Encore\Admin\Admin::script('$(".sidebar-menu").find("a[href*=\'/admin/userinfo\']").parent().hide();');
}

